<!DOCTYPE html>
<html>
<head lang="en">
  <meta charset="UTF-8">
  <title>我的首页</title>
  <link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<header>
  <h1><%= title %></h1>
</header>
<nav>
  <span><a href="/" title="首页">首页</a></span>
  <% if (user) { %>
  <span><a href="/post">发布</a></span>
  <span><a href="/archive">存档</a></span>
  <span><a href="/tags">标签</a></span>
  <span><a href="/upload">上传</a></span>
  <span><a href="/logout">退出</a></span>
  <% } else { %>
  <span><a href="/login" title="登录">登录</a></span>
  <span><a href="/reg" title="注册">注册</a></span>
  <% } %>
  <span>
    <form action="/search" method="get">
      <input type="text" class="search" name="keyword" placeholder="请输入关键字">
    </form>
  </span>
</nav>
<article>
  <% if (success) { %>
  <div><%= success %></div>
  <% } %>
  <% if (error) { %>
  <div><%= error %></div>
  <% } %>
